package code.c13;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/12/2 14:47
 * @package code.c13
 * @description 生产者，消费者 - 测试类
 */

public class ProduceConsumerThread {
    public static void main(String[] args) {
        WareHouse wareHouse = new WareHouse(20);

        ProducerThread producerRunnable = new ProducerThread(wareHouse);
        ConsumeThread consumeRunnable = new ConsumeThread(wareHouse);

        Thread producerThread = new Thread(producerRunnable);
        Thread consumeThread = new Thread(consumeRunnable);

        consumeThread.start();
        producerThread.start();

    }
}
